#ifndef _DBHANDLER_H_
#define _DBHANDLER_H_

#include <sddb.h>
#include <sdhlp/singleton.h>
#include "sdsvrhandler.h"

using namespace SGDP;

class CSvrHandlerMgr : public ISDSvrHandlerMgr
{
public:
    DECLARE_SINGLETON(CSvrHandlerMgr)

    ///Interface of ISDSvrHandlerMgr
    virtual bool Init(ISDBaseSvrMgr * poBaseSvrMgr);
    virtual ISDSvrHandler* GetSvrHandler(UINT8 bySvrType);
    virtual bool Run(void);
    virtual void Release(void);

    ISDBaseSvrMgr * GetBaseSvrMgr(void)     { return m_poBaseSvrMgr; }

private:
    CSvrHandlerMgr(void);
    virtual ~CSvrHandlerMgr(void);

    ISDBaseSvrMgr * m_poBaseSvrMgr;
};

#endif
